package com.itheima.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@Aspect
public class MyAspect5 {

    //前置通知
    //@Before("excution(public void com.itheima.service.impl.DeptServiceImpl.delete(java.lang.Integer))")
    //@Before("excution(void com.itheima.service.impl.DeptServiceImpl.delete(java.lang.Integer))")
    //@Before("excution(void delete(java.lang.Integer))")   //包名 .类名 强烈不建议省略
    //@Before("excution(* com.itheima.service.impl.DeptServiceImpl.delete(java.lang.Integer))")
    //@Before("excution(* com.*.service.impl.DeptServiceImpl.delete(java.lang.Integer))")
    //@Before("excution(* com.itheima.service.impl.*.delete(java.lang.Integer))")
    //@Before("excution(* com.itheima.service.impl.*.*(java.lang.Integer))")
    //@Before("excution(* com.itheima.service.impl.*.*(*))")
    //@Before("excution(* com.itheima.service.impl.*.del*(*))")

    //
//    @Before("execution(* com.itheima.service.impl.*.*e(*))")
    @Before("@annotation(com.itheima.anno.LogOperation)")
    public void before() {
        log.info("MyAspect5 -> before ... ");
    }
}





























